<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org/" xmlns:p="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>用户信息展示页</title>
</head>
<body>
<div>
    <p th:text="${user.username}"></p>
    <p th:text="${user.userpwd}"></p>
    <p th:text="${#dates.format(user.usertime, 'yyyy-MM-dd')}"></p>
    <p th:text="${user.dbName}"></p>
    <!-- <span th:if="${user.usersex} == 男">男</span>
     <span th:if="${user.usersex} == 女">女</span>-->
    <span th:unless="${user.usersex} == 女">-男-</span>
    <span th:unless="${user.usersex} == 男">-女-</span>
</div>
<hr />
<div th:object="${user}">
    <p th:text="*{username}"></p>
    <p th:text="*{userpwd}"></p>
    <p th:text="*{#dates.format(usertime, 'yyyy-MM-dd')}"></p>
    <p th:text="*{dbName}"></p>
</div>
<div th:switch="${user.usersex}">
    <span th:case="男">男</span>
    <span th:case="女">女</span>
</div>
</body>
</html>